package com.ruoyi.web.controller.mall.cmsNoticeSys.service.impl;

import com.ruoyi.web.controller.mall.cmsNoticeSys.domain.CmsNoticeSys;
import com.ruoyi.web.controller.mall.cmsNoticeSys.mapper.CmsNoticeSysMapper;
import com.ruoyi.web.controller.mall.cmsNoticeSys.service.ICmsNoticeSysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统公告Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-01-18
 */
@Service
public class CmsNoticeSysServiceImpl implements ICmsNoticeSysService 
{
    @Autowired
    private CmsNoticeSysMapper cmsNoticeSysMapper;

    /**
     * 查询系统公告
     * 
     * @param id 系统公告ID
     * @return 系统公告
     */
    @Override
    public CmsNoticeSys selectCmsNoticeSysById(String id)
    {
        return cmsNoticeSysMapper.selectCmsNoticeSysById(id);
    }

    /**
     * 查询系统公告列表
     * 
     * @param cmsNoticeSys 系统公告
     * @return 系统公告
     */
    @Override
    public List<CmsNoticeSys> selectCmsNoticeSysList(CmsNoticeSys cmsNoticeSys)
    {
        return cmsNoticeSysMapper.selectCmsNoticeSysList(cmsNoticeSys);
    }

    /**
     * 新增系统公告
     * 
     * @param cmsNoticeSys 系统公告
     * @return 结果
     */
    @Override
    public int insertCmsNoticeSys(CmsNoticeSys cmsNoticeSys)
    {
        return cmsNoticeSysMapper.insertCmsNoticeSys(cmsNoticeSys);
    }

    /**
     * 修改系统公告
     * 
     * @param cmsNoticeSys 系统公告
     * @return 结果
     */
    @Override
    public int updateCmsNoticeSys(CmsNoticeSys cmsNoticeSys)
    {
        return cmsNoticeSysMapper.updateCmsNoticeSys(cmsNoticeSys);
    }

    /**
     * 删除系统公告对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCmsNoticeSysByIds(String[] ids)
    {
        return cmsNoticeSysMapper.deleteCmsNoticeSysByIds(ids);
    }

    /**
     * 删除系统公告信息
     * 
     * @param id 系统公告ID
     * @return 结果
     */
    @Override
    public int deleteCmsNoticeSysById(String id)
    {
        return cmsNoticeSysMapper.deleteCmsNoticeSysById(id);
    }
}
